﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Details.aspx.vb" Inherits="Universities.UniDetails" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
    .style1
    {
        width: 95px;
    }
    .style2
    {
        width: 6px;
    }
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <br />
&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Button ID="btn_GoGallery" runat="server" Font-Bold="True" 
        ForeColor="Black" Text="University Gallery" />
    <br />
    <br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
    DataKeyNames="ID" DataSourceID="SqlDataSource1" CellPadding="4" 
        GridLines="Horizontal" BackColor="White" BorderColor="#336666" 
        BorderStyle="Double" BorderWidth="3px">
    <Columns>
        <asp:ImageField DataImageUrlField="Logo" HeaderText="Logo">
            <ControlStyle Height="200px" Width="200px" />
        </asp:ImageField>
        <asp:BoundField DataField="uni_name" HeaderText="uni_name" 
            SortExpression="uni_name" />
        <asp:BoundField ItemStyle-CssClass="Description" DataField="Description" HeaderText="Description" 
            SortExpression="Description">        
<ItemStyle CssClass="Description"></ItemStyle>
        </asp:BoundField>
    </Columns>
        <FooterStyle CssClass="_footerStyle" BackColor="White" ForeColor="#333333"/>
        <HeaderStyle CssClass="_headerStyle" BackColor="#336666" Font-Bold="True" 
            ForeColor="White"/>
        <PagerStyle CssClass="_pagerStyle" BackColor="#336666" ForeColor="White" 
            HorizontalAlign="Center"/>
        <RowStyle CssClass="_rowStyle" BackColor="White" ForeColor="#333333" />
        <SelectedRowStyle CssClass="_SelectedRowStyle" BackColor="#339966" 
            Font-Bold="True" ForeColor="White"/>
        <SortedAscendingCellStyle CssClass="_SortedAscendingCellStyle" 
            BackColor="#F7F7F7" />
        <SortedAscendingHeaderStyle CssClass="_SortedAscendingHeaderStyle" 
            BackColor="#487575"/>
        <SortedDescendingCellStyle CssClass="_SortedDescendingCellStyle" 
            BackColor="#E5E5E5"/>
        <SortedDescendingHeaderStyle CssClass="_SortedDescendingHeaderStyle" 
            BackColor="#275353"/>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:UniConnectionString %>" 
    ProviderName="<%$ ConnectionStrings:UniConnectionString.ProviderName %>" 
    SelectCommand="SELECT * FROM [universities] WHERE ([ID] = ?)">
    <SelectParameters>
        <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
    </SelectParameters>
</asp:SqlDataSource>
    <hr />
<br />
<h1 style="background-color:Teal; color:White; font-weight:bolder"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Share your Experience</h1>
    <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource2">
    <ItemTemplate>
        <table style="width: 100%;">
            <tr>
                <td style=" border-color:Maroon; border-right-style:double; border-right-width:thick; width:20%; text-align:right">
                    By <%# Eval("UserName") %><br /><%# Eval("CommentDate")%>
                </td>
                <td>
                    <%# Eval("Comments")%>
                </td>
            </tr>
        </table>
    </ItemTemplate>
    </asp:Repeater>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:UniConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:UniConnectionString.ProviderName %>" 
        
        SelectCommand="SELECT [Comments], [CommentDate], [UserName] FROM [Qry_Displaying_comments] WHERE ([ID] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <br />
    <asp:Label ID="test" runat="server"></asp:Label>
<br />
<hr />
    <asp:Label ID="lbl_validate_comments" runat="server" Font-Bold="True" 
        ForeColor="Red"></asp:Label>
<br />
<table style="width: 38%;">
    <tr>
        <td class="style1">
            User Name</td>
        <td class="style2">
            :</td>
        <td>
            <asp:LoginName ID="Uname_Comment" runat="server" ForeColor="Black" />
        </td>
    </tr>
    <tr>
        <td class="style1">
            Rating</td>
        <td class="style2">
            :</td>
        <td>
            <asp:RadioButtonList ID="rbl_comment_rating" runat="server" 
                RepeatDirection="Horizontal">
                <asp:ListItem>1</asp:ListItem>
                <asp:ListItem>2</asp:ListItem>
                <asp:ListItem>3</asp:ListItem>
                <asp:ListItem>4</asp:ListItem>
                <asp:ListItem>5</asp:ListItem>
            </asp:RadioButtonList>
        </td>
    </tr>
    <tr>
        <td class="style1">
            Comments</td>
        <td class="style2">
            :</td>
        <td>
            <asp:TextBox ID="txtB_comments" runat="server" Height="222px" 
                TextMode="MultiLine" Width="414px"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td class="style1">
            &nbsp;</td>
        <td class="style2">
            &nbsp;</td>
        <td>
            <asp:Button ID="btn_comment_submit" runat="server" Text="Submit" />
        </td>
    </tr>
</table>
<br />
<br />
<br />
</asp:Content>
